home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 29
/
Volume 29 - JOGO DISK .iso
/
Games
/
jungle_adventure.swf
/
scripts
/
__Packages
/
SSInterface.as
< prev
next >
Wrap
Text File
|
2006-11-29
|
2KB
|
96 lines
class SSInterface extends MovieClip
{
static var watchList = [];
function SSInterface()
{
super();
SSInterface.register(this);
this.stop();
}
function onUnload()
{
SSInterface.unregister(this);
}
function show(frame, noPause)
{
if(!noPause)
{
SSInterface.currentGame.pause();
}
this.btnCover.onRelease = function()
{
};
this.btnCover.useHandCursor = false;
this.gotoAndStop(frame);
}
static function hide()
{
SSInterface.target.resume();
}
static function showScreen(screen, noPause)
{
SSInterface.target.show(screen,noPause);
}
function resume()
{
SSInterface.currentGame.resume();
this.gotoAndStop(1);
}
static function register(mc)
{
SSInterface.target = mc;
}
static function unregister(mc)
{
SSInterface.target = null;
}
static function registerGame(game)
{
}
static function unwatchObject()
{
if(!SSInterface.currentObject)
{
return undefined;
}
var _loc2_ = undefined;
var _loc1_ = _loc2_ = SSInterface.watchList.length;
while((_loc1_ = _loc1_ - 1) > -1)
{
_loc2_[_loc1_].t.unwatch(_loc2_[_loc1_].n);
}
SSInterface.currentObject = null;
}
static function watchObject(obj, initMethod)
{
SSInterface.currentGame = obj.control.world.engine;
SSInterface.unwatchObject();
initMethod.apply(SSInterface,arguments);
SSInterface.currentObject = obj;
}
static function watchProp(obj, prop, method)
{
obj.watch(prop,method);
SSInterface.watchList.push({n:prop,t:obj});
method(prop,obj[prop],obj[prop]);
}
static function textValue(prop, oldValue, newValue)
{
SSInterface.target[prop] = newValue;
return newValue;
}
static function meterValue(prop, oldValue, newValue)
{
SSInterface.target[prop].setValue(newValue);
return newValue;
}
static function invertedMeterValue(prop, oldValue, newValue)
{
SSInterface.target[prop].value = 1 - newValue;
return newValue;
}
static function unwatchProp()
{
}
}